#pragma once

struct IntVec
{
	int x;
	int y;

	IntVec( int X, int Y )
		: x(X)
		, y(Y)
	{

	}
	
	inline IntVec& operator+=( const IntVec& rhs )
	{
		x += rhs.x;
		y += rhs.y;
		return *this;
	}

	inline IntVec& operator-=( const IntVec& rhs )
	{
		x -= rhs.x;
		y -= rhs.y;
		return *this;
	}

	inline IntVec& operator*=( const IntVec& rhs )
	{
		x *= rhs.x;
		y *= rhs.y;
		return *this;
	}

	inline IntVec& operator/=( const IntVec& rhs )
	{
		x /= rhs.x;
		y /= rhs.y;
		return *this;
	}

	inline IntVec& operator=( const IntVec& rhs )
	{
		x = rhs.x;
		y = rhs.y;
		return *this;
	}
};

inline IntVec operator+( IntVec lhs, const IntVec& rhs )
{
	lhs += rhs;
	return lhs;
}

inline IntVec operator-( IntVec lhs, const IntVec& rhs )
{
	lhs -= rhs;
	return lhs;
}


inline IntVec operator*( IntVec lhs, const IntVec& rhs )
{
	lhs *= rhs;
	return lhs;
}


inline IntVec operator/( IntVec lhs, const IntVec& rhs )
{
	lhs /= rhs;
	return lhs;
}

bool operator==( const IntVec& lhs, const IntVec& rhs )
{
	return lhs.x == rhs.x && lhs.y == rhs.y;
}

